import { ChecksumStream, ChecksumStreamInit } from "./ChecksumStream";
import { stream } from "@kit.ArkTS";

/**
 * @internal
 *
 * Creates a stream mirroring the input stream's interface, but
 * performs checksumming when reading to the end of the stream.
 */
// export function createChecksumStream(init: ChecksumStreamInit<ReadableStreamType>): ReadableStreamType;
export function createChecksumStream(init: ChecksumStreamInit<stream.Readable>): stream.Readable{
  return new ChecksumStream(init as ChecksumStreamInit<stream.Readable>);
};
